using System;

namespace JGSY.CMS.LowCode.Platform.Application.DTOs
{
    /// <summary>
    /// 安全日志数据传输对象
    /// 用于安全日志的数据传输和API交互
    /// </summary>
    public class SecurityLogDto
    {
        /// <summary>
        /// 安全日志标识符
        /// </summary>
        public long Id { get; set; }
        
        /// <summary>
        /// 跟踪标识符
        /// </summary>
        public string? TraceId { get; set; }
        
        /// <summary>
        /// 日志级别
        /// </summary>
        public string? LogLevel { get; set; }
        
        /// <summary>
        /// 日志消息
        /// </summary>
        public string? Message { get; set; }
        
        /// <summary>
        /// 时间戳
        /// </summary>
        public DateTime Timestamp { get; set; }
        
        /// <summary>
        /// 用户标识符
        /// </summary>
        public string? UserId { get; set; }
        
        /// <summary>
        /// 请求路径
        /// </summary>
        public string? RequestPath { get; set; }
        
        /// <summary>
        /// HTTP方法
        /// </summary>
        public string? HttpMethod { get; set; }
        
        /// <summary>
        /// 状态码
        /// </summary>
        public int? StatusCode { get; set; }
        
        /// <summary>
        /// IP地址
        /// </summary>
        public string? IpAddress { get; set; }
        
        /// <summary>
        /// 用户代理
        /// </summary>
        public string? UserAgent { get; set; }
        
        /// <summary>
        /// 安全事件类型
        /// </summary>
        public string? SecurityEventType { get; set; }
        
        /// <summary>
        /// 威胁级别
        /// </summary>
        public string? ThreatLevel { get; set; }
        
        /// <summary>
        /// 攻击类型
        /// </summary>
        public string? AttackType { get; set; }
        
        /// <summary>
        /// 是否被阻止
        /// </summary>
        public bool IsBlocked { get; set; } = false;
        
        /// <summary>
        /// 阻止原因
        /// </summary>
        public string? BlockReason { get; set; }
        
        /// <summary>
        /// 风险评分
        /// </summary>
        public int? RiskScore { get; set; }
        
        /// <summary>
        /// 地理位置
        /// </summary>
        public string? GeolocationInfo { get; set; }
        
        /// <summary>
        /// 设备信息
        /// </summary>
        public string? DeviceInfo { get; set; }
        
        /// <summary>
        /// 租户ID
        /// </summary>
        public string? TenantId { get; set; }
        
        /// <summary>
        /// 关联ID
        /// </summary>
        public string? CorrelationId { get; set; }
        
        /// <summary>
        /// 额外数据
        /// </summary>
        public string? AdditionalData { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    }
}
